package com.ruoyi.web.runner;

import com.ruoyi.app.service.ICaseConsumerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @ Auther: chencunjun
 * @ Date: 2019/12/13 15:40
 * @ Description: kafka消费者初始化启动类
 */
@Component
public class KafkaConsumerRunner implements CommandLineRunner {
    private static final Logger log = LoggerFactory.getLogger(KafkaConsumerRunner.class);
    @Autowired
    ICaseConsumerService caseConsumerService;


    @Override
    public void run(String... strings) throws Exception {
        log.info("kafka消费者启动成功.......");
        caseConsumerService.dataRecevie();
        //caseConsumerService.dataSimulator();
    }
}
